#pragma once
#include "TrMarket.h"
#include <QTableWidget>
#include <QHeaderView>
#include "NoFocusDelegate.h"
#include "TrMasters.h"

#if _MSC_VER >= 1600
#pragma execution_character_set("utf-8")
#endif

class TrTableMaster : public QTableWidget, public TrObserver
{
	Q_OBJECT
public:
	explicit TrTableMaster(QWidget* parent = nullptr);
	void init_ui();
	void init_table_data();
	virtual void OnReceive(TrResponseID rId, void* wParam, void* lParam) override;

signals:
	void check_code(const QString& code);

private:
	std::unordered_map<std::string, int>		m_codeInRowId;
	std::map<std::string, std::string>			m_codeMasters;
};

